import request from '@/sheep/request';

export default {
	//是否是微会员
	isvip: (params) =>
		request({
			url: 'course.index/isvip',
			method: 'GET',
			params,
		}),
	//公开课报名
	listgkk: (params) =>
		request({
			url: 'course.gkk/list',
			method: 'GET',
			params,
		}),
		
	//公开课报名
	gkkBm: (params) =>
		request({
			url: 'course.gkk/gkkBm',
			method: 'GET',
			params,
		}),
	//获取用户的公开课
	getUserGkk: (params) =>
		request({
			url: 'course.gkk/getUserGkk',
			method: 'GET',
			params,
		}),
	//CC直播
	zhibo: (params) =>
		request({
			url: 'course.live/zhibo',
			method: 'GET',
			params,
		}),

	//CC回放
	huifang: (params) =>
		request({
			url: 'course.live/huifang',
			method: 'GET',
			params,
		}),
		
	//腾讯云点播
	lubo: (params) =>
		request({
			url: 'course.tencentvod/index',
			method: 'GET',
			params,
		}),

	//存储学习记录
	saveLearRrecord: (params) =>
		request({
			url: 'course.live/saveLearnRecord',
			method: 'GET',
			params,
			custom:{
				showLoading: false
			}
		}),

	//查询我的课程，废弃
	getCourseByUser: (params) =>
		request({
			url: 'course.index/getCourseByUser',
			method: 'GET',
			params,
		}),
		
	//查询我的录播课
	listCourseByUser: (params) =>
		request({
			url: 'course.index/listCourseByUser',
			method: 'GET',
			params,
		}),
		
	//查询我最新的学习记录
	getLearnRecord: (params) =>
		request({
			url: 'course.index/getRecentLearnRecord',
			method: 'GET',
			params,
		}),
		
	//查询我的标准商品
	getBzspByUser: (params) =>
		request({
			url: 'course.index/getBzspByUser',
			method: 'GET',
			params,
		}),

	//查询目录
	getLessonByGoodsid: (params) =>
		request({
			url: 'course.index/getLessonByGoodsid',
			method: 'GET',
			params,
		}),
	//查询标准商品关联课程
	getAllLessonByGoodsid: (params) =>
		request({
			url: 'course.index/getAllLessonByGoodsid',
			method: 'GET',
			params,
		}),
	//根据id获取课件资料讲义地址
	getDocumentById: (params) =>
		request({
			url: 'course.index/getDocumentById',
			method: 'GET',
			params,
		}),
	//查今天的直播课
	getTodayLiveCourse: (params) =>
		request({
			url: 'course.index/getTodayLiveCourse',
			method: 'GET',
			params,
		}),
	//查用户学习报告
	getStudyReport: (params) =>
		request({
			url: 'course.index/getStudyReport',
			method: 'GET',
			params,
		}),
	//查用户学习报告详情
	getStudyReportDetail: (params) =>
		request({
			url: 'course.index/getStudyReportDetail',
			method: 'GET',
			params,
		}),
	// 获取课程分类
	getCourseCategory: (params) =>
		request({
			url: 'category/indexpc?id=174',
			method: 'GET',
			params,
		}),
	// 获取班型分类
	getBanxingCategory: (params) =>
		request({
			url: 'category?id=167',
			method: 'GET',
			params,
		}),
	// 获取课程分类,包含題庫分類
	getCourseCategoryWithTK: async (params) => {
		const res = await request({
			url: 'category/indexpcTk?id=174',
			method: 'GET',
			params,
		});
		return res;
	},
	//查用户学习报告详情
	getUserCategory: (params) =>
		request({
			url: 'course.index/getUserCategory',
			method: 'GET',
			params,
		}),
	getUserAllLiveCourse: (params) =>
			request({
				url: 'course.index/getUserAllLiveCourse',
				method: 'GET',
				params,
			}),
	updateDuration:(params)=>
		request({
			url: 'course.index/updateDuration',
			method: 'GET',
			params,
		})
			
};
